<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const p = new Promise((resolve, reject) => {
            setTimeout(() => {
                resolve('北京市')
            }, 2000)
        })

        const p2 = p.then(result => {
            console.log(result);
            return new Promise((resolve, reject) => {
                setTimeout(() => {
                    resolve(result + '---北京')
                }, 2000)
            })
        })

        p2.then(result => {
            console.log(result);

        })

        // 每个Promise的then方法返回的都是一个新的Promise对象
        console.log(p === p2);

    </script>
</body>

</html>